package com.naiterui.ehp.bs.consult.controller.inner;

import com.naiterui.ehp.bp.bo.groupConsult.GroupConsultSignCallbackBO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.consult.service.IVideoConsultService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gaoliangliang
 * @date 2022/8/4
 * @since 0.0.1
 */
@RestController
@RequestMapping("/inner/esign")
@RequiredArgsConstructor
@Slf4j
public class InnerEsignController {

    private final IVideoConsultService videoConsultService;

    @ApiOperation(value = "病历签名回调")
    @PostMapping("sign/result")
    public void groupConsultSignCallBack(@RequestBody GroupConsultSignCallbackBO callbackBO) throws BusinessException {
        log.info("签名回调成功：callbackBO={}", callbackBO);
        videoConsultService.groupConsultOpinionCallback(callbackBO);
    }


}
